import { AxiosResponse } from 'axios'
import http from '../http'
import {LoginParam,LoginRes,ChangePassword} from './types'

/**
 * 登录模块api
 */
class LoginApi {
	/**
	 * @description 登录接口
	 * @returns {Promise<Axios.Response>}
	 */
	static login(params:LoginParam):Promise<Axios.Response<LoginRes>>{
		return http.post('/admin/login',params)
	}

	static changePassword(params:ChangePassword):Promise<Axios.Response<any>>{
		return http.post('/admin/reset-password',params)
	}
}

export default LoginApi
